#include "gamescene.h"
#include<gamedefine.h>
#include<maploader.h>
#include<player.h>
#include<QTimer>
GameScene::GameScene(QObject *parent)
    : QGraphicsScene{parent}
{
    gameTimer = new QTimer(this);
    connect(gameTimer, &QTimer::timeout, this, &GameScene::update);
    gameTimer->start(16); // 约60FPS
}

void GameScene::update()
{
    if(gameplayer!=nullptr){
        gameplayer->update();

    }
    QGraphicsScene::update();
}
